/**
 * @program: planet-company
 * @description:
 * @author: jyz
 * @create: 2019-06-18 16:23
 **/
public class SimplePizzaFactory {

    public MyFactoryInterface createPizza(String type) {
        MyFactoryInterface myFactoryInterface = null;

        if("cheese".equals(type)) {
            myFactoryInterface = new Product1();
        } else if ("clam".equals(type)) {
            myFactoryInterface = new Product2();
        } else if("veggie".equals(type)) {
            myFactoryInterface = new Product3();
        }


//        myFactoryInterface.prepare();
//        myFactoryInterface.bake();
//        myFactoryInterface.cut();
//        myFactoryInterface.box();

        return myFactoryInterface;
    }

}
